package com.zmn.plat.dubbo.interfaces.expressage;

import java.util.List;

import javax.validation.constraints.NotBlank;

import com.zmn.common.dto2.ResponseDTO;
import com.zmn.plat.common.dto.expressage.ExpressageCompanyDRO;
import com.zmn.plat.common.dto.expressage.ExpressageDRO;

import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiParam;

/**
 * 快递服务
 *
 * @author quanjic
 * @version v1.0
 * @since 2018/11/28 14:39
 * @see "com.zmn.tapi.dubbo.interfaces.expressage.ExpressageRemoteService"
 **/
@Api(value = "快递服务", tags = {"快递"})
@Deprecated
public interface ExpressageListRemoteService {

    /**
     * 快递变更 TAGS
     */
    String TAGS_EXPRESSAGE_UPDATE = "expressage_update";

    /**
     * 通过快递单号查询快递。
     *
     * @param company
     *            快递公司编码，非null
     * @param code
     *            快递单号，非null
     * @return 快递或者null
     */
    @ApiOperation(value = "通过快递单号查询快递", response = ResponseDTO.class, notes = "通过快递单号查询快递", tags = {"快递单号"})
    ResponseDTO<ExpressageDRO> getByCompanyAndCode(@NotBlank(message = "company不能为空") @ApiParam(value = "快递公司编码", required = true) String company,
        @NotBlank(message = "code不能为空") @ApiParam(value = "快递单号", required = true) String code);

    /**
     * 订阅快递单号；获取快递最新消息
     *
     * @param company
     *            快递公司编码，可为空
     * @param code
     *            快递单号
     */
    @ApiOperation(value = "订阅快递单号；获取快递最新消息", response = ResponseDTO.class, notes = "订阅快递单号；获取快递最新消息", tags = {"订阅"})
    ResponseDTO getSubscribeByCompanyAndCode(@ApiParam(value = "快递公司编码") String company, @NotBlank(message = "code不能为空") @ApiParam(value = "快递单号", required = true) String code);

    /**
     * 快递100回调
     *
     * @param content
     * @return TODO 命名问题
     */
    @ApiOperation(value = "快递100回调", response = ResponseDTO.class, notes = "快递100回调", tags = {"回调"})
    ResponseDTO callbackWithKuaiDi100(@NotBlank(message = "content不能为空") @ApiParam(value = "内容", required = true) String content);

    /**
     *
     * @return 所有快递公司
     */
    ResponseDTO<List<ExpressageCompanyDRO>> listCompany();

    /**
     * 通过快递单号查询可能的快递公司列表
     *
     * @param code
     * @return 可能的快递公司列表
     */
    @ApiOperation(value = "通过快递单号查询可能的快递公司列表", response = ResponseDTO.class, notes = "可能的快递公司列表", tags = {"快递单号", "快递公司"})
    ResponseDTO<List<ExpressageCompanyDRO>> listCompanyByCode(@NotBlank(message = "code不能为空") @ApiParam(value = "快递单号", required = true) String code);

}
